<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
    <meta charset="utf-8">
    <title>WangID通城——登录</title>
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" type="text/css" href="css/ziy.css">
    <script src="js/jquery-1.11.3.min.js"></script>
</head>
<body>
<!--dengl-->
<div class="beij_center">
    <div class="dengl_logo">
        <img src="images/logo_1.png">
        <h1>欢迎登录</h1>
    </div>
</div>
<div class="dengl_beij">

    <div class="banner_xin">
        <img src="images/ss.jpg">
    </div>
    <div class="beij_center dengl_jvz">
        <div class="login_form">
            <div class="login_tab">
                <h2>欢迎登录</h2>
            </div>
            <div class="kengl_kuang">
                <div class="txt_kuang">
                    <input type="text" class="itxt" id="userPhone" placeholder="邮箱/用户名/已验证手机">
                    <input type="text" class="itxt" id="password" placeholder="密码">
                </div>
                <div class="remember">
                    <div class="fl">
                        <input type="checkbox">
                        <label>自动登录</label>
                    </div>
                    <div class="fr">
                        <a href="#" class="fl" target="_blank" title="忘记密码">忘记密码?</a>
                    </div>
                </div>
                <input type="button" onclick="clientLogin()" tabindex="5" value="登 录" class="btnnuw">
            </div>
            <div class="corp_login">
                <!--
                                <div class="mingb_shoq"><a href="#">名榜授权登录！</a></div>
                -->
                <div class="regist_link"><a href="register.html" target="_blank"><b></b>立即注册</a></div>
            </div>
        </div>
    </div>
</div>


<div class="jianj_dib">
    <div class="beia_hao">
        <p>京ICP备：14012449号 黔ICP证：B2-20140009号 </p>
        <p class="gonga_bei">京公网安备：11010602030054号</p>
    </div>
</div>
</body>
<script>
    var baseUrl = "/shop/syslogin";

    function clientLogin() {
        //var userPhone = $("#userPhone").val();
        //var password = $("#password").val();
        var userPhone = "18003763878"
        var password =  "123456"
        if (userPhone == "") {
            alert("请输入账号");
        } else if (password == "") {
            alert("请输入密码");
        } else {
            $.ajax({
                url: baseUrl + '/clientLogin',
                async: false,
                data: {"userPhone": userPhone, "password": password},
                success: function (result) {
                    if (result.code == 0) {
                        $(window).attr('location', './index.html');
                    } else {
                        alert("登录失败:" + result.msg)
                    }
                }
            });
        }
    }
</script>
</html>
